<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8" />
	<title>Document</title>
</head>

<body>
	<script type="text/javascript">
		let a = 'name'
		let obj = {} // {name:'tome'}


		// obj.a = 'tom' // {a:'tom'}

		
		obj[a] = 'tom'// {name:'tome'}

		console.log(obj);
	</script>
</body>

</html>